package com.hefei.blog.web.velocity.tools;

import org.apache.velocity.tools.Scope;
import org.apache.velocity.tools.config.DefaultKey;
import org.apache.velocity.tools.config.ValidScope;

import com.hefei.blog.base.utils.html.FileHtmlUtils;

@DefaultKey("file")
@ValidScope(Scope.APPLICATION)
public class FileTool {

	public String read(String relativePathAndName){
		String content =  FileHtmlUtils.read(relativePathAndName);
		if(content == null)
			return "";
		return content;
	}
}
